package org.bozo.im.service.protocols.fake;

import java.util.ArrayList;

import org.bozo.im.common.types.Protocol;
import org.bozo.im.common.types.ProtocolRequirement;
import org.bozo.im.service.IMSession;
import org.bozo.im.service.IMSessionBuilder;
import org.bozo.im.service.IMSessionConfiguration;

public class FakeSessionBuilder implements IMSessionBuilder {

	public ArrayList<ProtocolRequirement> getRequirements() {
		return new ArrayList<ProtocolRequirement>();
	}
	
	public IMSession buildSession(IMSessionConfiguration pConfiguration) {
		return new FakeSession(pConfiguration);
	}
	
	public IMSessionConfiguration buildConfiguration(String pLogin, String pPassword, String pServer, int pPort) {
		
		FakeSessionConfiguration lRes = new FakeSessionConfiguration();
		lRes.setPort(123);
		lRes.setLogin("aaa");
		lRes.setPassword("bbb");
		lRes.setServer("ccc");
		lRes.setProtocol(Protocol.FAKE);
		
		return lRes;
	}
}
